﻿@inject ApiHelper apiHelper
@{

    Models.SiteNavigateModel[] navigates = ViewData["navs"] as Models.SiteNavigateModel[]??new SiteNavigateModel[] { };
  
    var culture=ViewData["culture"] as string;
    var settings = await apiHelper.GetSettingsListAsync("site");
    var logo = settings.FirstOrDefault(x => x.Key == "logo")?.Value ?? "";
 }

<header class="header">
    <nav class="header-fixed">
        <div class="container">
            <div class="row flex-nowrap align-items-center justify-content-between">
                <div class="col-auto d-block d-lg-none header-fixed-col">
                    <div class="main-mnu-btn">
                        <span class="bar bar-1"></span>
                        <span class="bar bar-2"></span>
                        <span class="bar bar-3"></span>
                        <span class="bar bar-4"></span>
                    </div>
                </div>
                <div class="col-auto header-fixed-col">
                    <!-- Begin logo -->
                    <a href="/" class="logo" title="RsCms">
                        <img src="@logo" width="115" height="36" alt="RsCms">
                    </a><!-- End logo -->
                </div>
                <div class="col-auto header-fixed-col d-none d-lg-block col-static">
                    <!-- Begin main menu -->
                    <nav class="main-mnu">
                        <ul class="main-mnu-list">
                            @foreach (var item in navigates)
                            {
                                if (ViewBag.CurrentNavigate == item.Url)
                                {
                                    <text><li class="active"><a href="@item.Url" data-title="@L[item.Label]"><span>@L[item.Label]</span></a></li></text>
                                }else
                                {
                                    <text>
                                    <li><a href="@item.Url" data-title="@L[item.Label]"><span>@L[item.Label]</span></a></li></text>
                                }                              
                            }

                        </ul>
                    </nav><!-- End main menu -->
                </div>
                <div class="col-auto header-fixed-col col-static">
                    <!-- Begin header actions -->
                    <ul class="header-actions">
                        <!-- Begin header languarge -->
                        <li class="d-none d-lg-block">
                            <div class="header-lang">
                                <div class="header-lang-current"><i class="material-icons md-22">language</i></div>
                                <ul class="header-lang-list">
                                    <li class="@(culture=="en-US"?"active":"")"><a href="/?culture=en-US" class="hover-link" data-lang="en" data-title="English"><span>English</span></a></li>
                                    <li class="@(culture=="zh-CN"?"active":"")"><a href="/?culture=zh-CN" class="hover-link" data-lang="zh" data-title="中文"><span>中文</span></a></li>
                                </ul>
                            </div>
                        </li><!-- End header languarge -->
                        <!-- Begin header navbar -->
                        <li class="d-block d-lg-none">
                            <div class="header-navbar">
                                <div class="header-navbar-btn">
                                    <i class="material-icons md-24">more_vert</i>
                                </div>
                                <ul class="header-navbar-content">
                                    <li>
                                        <a href="mailto:7959927@qq.com">
                                            <i class="material-icons md-20">mail_outline</i>
                                            <span>7959927@qq.com</span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="mailto:7959927@qq.com" class="formingHrefTel">
                                            <i class="material-icons md-20">support_agent</i>
                                            <span>1-888-777-1234</span>
                                        </a>
                                    </li>
                                    <li>
                                        <!-- Begin social links -->
                                        <ul class="social-links">
                                            <li>
                                                <a href="#!" title="Facebook">
                                                    <svg viewBox="0 0 320 512"><use xlink:href="/public/img/sprite.svg#facebook-icon"></use></svg>
                                                </a>
                                            </li>
                                            <li>
                                                <a href="#!" title="Instagram">
                                                    <svg viewBox="0 0 448 512"><use xlink:href="/public/img/sprite.svg#instagram-icon"></use></svg>
                                                </a>
                                            </li>
                                            <li>
                                                <a href="#!" title="LinkedIn">
                                                    <svg viewBox="0 0 448 512"><use xlink:href="/public/img/sprite.svg#linkedin-icon"></use></svg>
                                                </a>
                                            </li>
                                            <li>
                                                <a href="#!" title="Twitter">
                                                    <svg viewBox="0 0 512 512"><use xlink:href="/public/img/sprite.svg#twitter-icon"></use></svg>
                                                </a>
                                            </li>
                                        </ul><!-- End social links -->
                                    </li>
                                </ul>
                            </div>
                        </li><!-- End header navbar -->
                    </ul><!-- End header actions -->
                </div>
            </div>
        </div>
    </nav><!-- End header fixed -->
</header>